<!DOCTYPE html>
<head>
	<title>用户登录</title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
		
	<link href="<?=TPL_PATH?>/admin/js/login/css/font-awesome.min.css" rel="stylesheet" type="text/css">
	<link href="<?=TPL_PATH?>/admin/js/login/css/bootstrap.min.css" rel="stylesheet" type="text/css">
	<link href="<?=TPL_PATH?>/admin/js/login/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css">
	<link href="<?=TPL_PATH?>/admin/js/login/css/templatemo_style.css" rel="stylesheet" type="text/css">	

	<!--easyui--->
	<link rel="stylesheet" type="text/css" href="<?=TPL_PATH?>/admin/js/easyui/themes/default/easyui.css?<?=VERSION?>">
    <link rel="stylesheet" type="text/css" href="<?=TPL_PATH?>/admin/js/easyui/themes/icon.css?<?=VERSION?>">
    <link rel="stylesheet" type="text/css" href="<?=TPL_PATH?>/admin/css/over-easyui.css?<?=VERSION?>">
    <script type="text/javascript" src="<?=TPL_PATH?>/admin/js/easyui/jquery.min.js?<?=VERSION?>"></script>
    <script type="text/javascript" src="<?=TPL_PATH?>/admin/js/easyui/jquery.easyui.min.js?<?=VERSION?>"></script>
	<script type="text/javascript" src="<?=TPL_PATH?>/admin/js/easyui/locale/easyui-lang-zh_CN.js?<?=VERSION?>"></script>
	<script type="text/javascript" src="<?=TPL_PATH?>/admin/js/appFun.js?<?=VERSION?>"></script>
	<script type="text/javascript" src="<?=TPL_PATH?>/admin/js/easyui_extend.js?<?=VERSION?>"></script>
</head>
<body class="templatemo-bg-gray">
	<div class="container">
		<div class="col-md-12">
			<h1 class="margin-bottom-15">用户登录</h1>
			<form id="loginForm" class="form-horizontal templatemo-container templatemo-login-form-1 margin-bottom-30" role="form" action="<?=CONTEXT_PATH?>/admin/user/login" method="post">				
		        <div class="form-group">
		          <div class="col-xs-12">		            
		            <div class="control-wrapper">
		            	<label for="username" class="control-label fa-label"><i class="fa fa-user fa-medium"></i></label>
		            	<input name="login_name" type="text" class="form-control" id="username" placeholder="Username">
		            </div>		            	            
		          </div>              
		        </div>
		        <div class="form-group">
		          <div class="col-md-12">
		          	<div class="control-wrapper">
		            	<label for="password" class="control-label fa-label"><i class="fa fa-lock fa-medium"></i></label>
		            	<input name="login_pwd" type="password" class="form-control" id="password" placeholder="Password">
		            </div>
		          </div>
		        </div>
				<!--
		        <div class="form-group">
		          <div class="col-md-12">
	             	<div class="checkbox control-wrapper">
	                	<label>
	                  		<input type="checkbox"> Remember me
                		</label>
	              	</div>
		          </div>
		        </div>
				 -->
				
		        <div class="form-group">
		          <div class="col-md-12">
		          	<div class="control-wrapper">
		          		<input type="submit" value="Log in" class="btn btn-info">
						<!-- 
		          		<a href="forgot-password.html" class="text-right pull-right">Forgot password?</a>
						-->
					</div>
		          </div>
		        </div>
		        
				<!--
				<hr>
		        <div class="form-group">
		        	<div class="col-md-12">
		        		<label>其它登录: </label>
		        		<div class="inline-block">
		        			<a href="#"><i class="fa fa-facebook-square login-with"></i></a>
			        		<a href="#"><i class="fa fa-twitter-square login-with"></i></a>
			        		<a href="#"><i class="fa fa-google-plus-square login-with"></i></a>
			        		<a href="#"><i class="fa fa-tumblr-square login-with"></i></a>
			        		<a href="#"><i class="fa fa-github-square login-with"></i></a>
		        		</div>		        		
		        	</div>
		        </div>
				-->
		      </form>
			  <!--
		      <div class="text-center">
		      	<a href="create-account.html" class="templatemo-create-new">Create new account <i class="fa fa-arrow-circle-o-right"></i></a>	
		      </div>
			  -->
		</div>
	</div>
	<script type="text/javascript">
		$("form#loginForm").form({
			onSubmit:function(params){
				if(this.login_name.value==''){
					$.appTip('请输入登录用户名.');
					return false;
				}
				if(this.login_pwd.value==''){
					$.appTip('请输入登录密码.');
					return false;
				}
				return true;
			},
			success:function(jsonStr){
				$.messager.progress('close');
				var json = str2Json(jsonStr);
				if(json.msg){
					$.appTip(json.msg);
				}
				if(json.success){
					
					if(document.referrer!=''){
						location.href= document.referrer;
					}else{
						if(json.data.type==1){
							location.href="<?=CONTEXT_PATH?>/admin/home/index";
						}else{
							location.href="<?=CONTEXT_PATH?>/";
						}
					}
				}
				
			}
		});
		$(function(){
			//$.messager.progress();
		});
	</script>
</body>
</html>